import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.LinkedList;


public abstract class Matrix {

	protected LinkedList<ValueSlot> matrix;
	protected LinkedList<Long> data;
	
	public Matrix()
	{
		matrix = new LinkedList<ValueSlot>();
		data = new LinkedList<Long>();
	}
	
	public LinkedList<ValueSlot> getMatrix()
	{
		return matrix;
	}
	
	public void setMatrix(LinkedList<ValueSlot> matrix)
	{
		this.matrix = matrix;
	}
	
	public LinkedList<Long> getData()
	{
		return data;
	}
	
	public void setData(LinkedList<Long> data)
	{
		this.data = data;
	}
	
	public abstract void process();
	
	/*
	 * returns true if two calendars are on the same day
	 */
	public boolean match(GregorianCalendar from, GregorianCalendar to)
	{
		int fromY = from.get(Calendar.YEAR);
		int fromM = from.get(Calendar.MONTH);
		int fromD = from.get(Calendar.DAY_OF_MONTH);
		
		int toY = to.get(Calendar.YEAR);
		int toM = to.get(Calendar.MONTH);
		int toD = to.get(Calendar.DAY_OF_MONTH);
		
		if(fromY == toY && 
				fromM == toM &&
				fromD == toD)
		{
			return true;
		}
		else
		{
			return false;
		}
	}
}
